<html>
  <head>
    <title>About Db4o Net Beans Module</title>
    <link rel="stylesheet" href="nbdocs:/org/netbeans/modules/usersguide/ide.css" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <h2>About Db4o Net Beans Module</h2>
    <p>
      <!-- TODO describe your module, add more pages... -->
<div class=Section1>

<h1>Db4o-NetBeans-Plugin, Version 0.2</h1>

<p class=MsoNormal><span style='font-size:9.0pt'>Author: Gerd Klevesaat.(Gerd.Klevesaat@googlemail.com)</span></p>

<p class=MsoNormal>&nbsp;</p>

<h2>Introduction </h2>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Db4oNetBeans is a plug-in for the NetBeans IDE to explore
and query the db4o database content (http://www.db4o.com)).</p>

<p class=MsoNormal>It is possible to open a custom number of db4o databases and
explore and change the content in a db4o database editor window.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Feature list for version 0.2:</p>

<ul style='margin-top:0pt' type=disc>
 <li class=MsoNormal>Open/Close a db4o database file</li>
 <li class=MsoNormal>Browse the objects stored in the database</li>
 <li class=MsoNormal>Change properties of stored objects</li>
 <li class=MsoNormal>Add/Remove objects </li>
 <li class=MsoNormal>Add/Remove queries</li>
 <li class=MsoNormal>Executing queries</li>
 <li class=MsoNormal>Displaying query results in a separate editor window</li>
</ul>

<p class=MsoNormal>&nbsp;</p>

<h2>Accessing a db4o database</h2>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>db4o databases are accessed by simply creating a custom file
type choosing <i>New File </i>on the <i>File </i>menu and adding it to the
opened java project.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>On page one of the <i>New File</i> wizard select the
category <i>Db4o</i>. This category offers one new file template type called <i>db4oTemplate.db4o</i>.
Select it and press <i>Next</i>.  </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=554 height=374
src="images/image001.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The second step appears. Enter a name for the new <i>db4o</i>
file and adjust settings for the location of the file.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=554 height=395
src="images/image002.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>After entering data, the file of type <i>db4o</i> is added to
the selected java project.</p>

<p class=MsoNormal>The following dialog appears to specify connection details.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=403 height=339
src="images/image003.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Enter a descriptive custom name for the connection (not
displayed in 0.2). Depending on the type of db4o database connection:</p>

<ul style='margin-top:0pt' type=disc>
 <li class=MsoNormal>Enter or select a db4o database file</li>
 <li class=MsoNormal>Enter db4o object server connection parameters.</li>
</ul>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>After pressing OK, the db4o database file will be added to
the selected package as new sub node and it will be opened in the db4o database
editor. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=553 height=435
src="images/image004.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Any number of db4o databases may be added to a java project.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The db4o database editor will be used to display object
data, add or remove objects and to define queries. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The opened db4o database is displayed in a tree with the
reference to the database as a root. It has two child objects. One displays the
database content structure. The other is the root for the queries that may be
defined on the database.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The database content structure displays the stored classes
and its instances. </p>

<p class=MsoNormal>Note, that only a limited number of objects of each class
are displayed. More can be loaded on demand. </p>

<p class=MsoNormal><img width=346 height=273
src="images/image005.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The number of objects loaded on each request is a parameter
in the options dialog.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Editing data is based on the standard properties window provided
by NetBeans. </p>

<p class=MsoNormal>Note, that it (in version 0.2) the properties window is not
visible when the db4o database editor is opened the first time. You can
activate it by selecting it from the windows menu.  </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Depending on the node selected in the db4o database editor,
you can display its data in a table view. Open the window menu and select the <i>Table
View Window</i>.  By default, it will be displayed docked at the bottom of the
application window as illustrated in the picture below.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=554 height=396
src="images/image006.jpg"> </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<h3>Re-Opening a db4o database file type</h3>

<p class=MsoNormal> </p>

<p class=MsoNormal>This is simply done by selecting the menu item Open Data
Editor from the context menu of the db4o database file type in the navigator
window.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=381 height=212
src="images/image007.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<h3>Closing a db4o database file</h3>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>A db4o database file is closed by closing the editors. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<h2>Queries</h2>

<p class=MsoNormal>&nbsp;</p>

<h3>Adding Queries</h3>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Queries are added by selecting the <i>Add Query…</i> from
the context menu of the <i>Queries</i> sub node.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=407 height=325
src="images/image008.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The Add Query dialog opens where you can add a name for the
query and the type of the objects to query for.</p>

<p class=MsoNormal>Additionally, the type of query can be selected from a combo
box. Two query types are supported by now: SQL and SODA.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=469 height=234
src="images/image009.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>When pressing OK and a new query sub node labeled with the
given name is added to the <i>Queries</i> node.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=554 height=211
src="images/image010.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>For a SQL query, the expression can now be entered using the
properties window. Either enter the expression directly into the one-line edit
field or open a multi-line text field by pressing the …-button on the right.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=515 height=403
src="images/image011.jpg"> </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Pressing OK assigns the expression to the query.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<h3>Executing Queries</h3>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Queries can be executing by selecting the menu item Execute…
from the context menu of the query. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=456 height=324
src="images/image012.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>After execution of the query, the result is displayed in
another editor window.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=554 height=397
src="images/image013.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The count of objects affected by the query is displayed both
in the properties window and in the title of the editor window.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<h2>Editing</h2>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Object properties are edited using the properties window.
Select the node of an object and edit its properties in the edit fields of the properties
window.</p>

<p class=MsoNormal>(Future version may come up add customize editors) </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Objects can be added or removed. </p>

<p class=MsoNormal>Select a class node to add objects for and open its context
menu. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=534 height=283
src="images/image014.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>A new empty object node is appended to the class node. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=392 height=224
src="images/image015.jpg"></p>

<p class=MsoNormal>   </p>

<p class=MsoNormal>Now the properties can be changed using the properties
window.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=266 height=132
src="images/image016.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>The properties sub nodes of the object node are updated
accordingly. </p>

<p class=MsoNormal><img width=572 height=410
src="images/image017.jpg"> </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Changes to the db4o database can be committed explicitly by
selecting a corresponding context menu item on the root in the db4o database
editor. </p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal><img width=484 height=263
src="images/image018.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<h2>Options dialog</h2>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>Some settings may be modified by the user using the standard
options dialog. However, the options dialog will be revised in next versions.</p>

<p class=MsoNormal> </p>

<ul style='margin-top:0pt' type=disc>
 <li class=MsoNormal><i>Threshold</i>: Number of objects to load on each
     request.</li>
 <li class=MsoNormal><i>Suppress</i>: comma separated list of package names to
     suppress when displaying the database structure.</li>
 <li class=MsoNormal><i>Delete on defragmentation</i>: If checked, objects may
     be deleted on defragmentation,</li>
 <li class=MsoNormal><i>Classpath Settings</i>.</li>
</ul>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>  </p>

<p class=MsoNormal><img width=554 height=345
src="images/image019.jpg"></p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>&nbsp;</p>

<h2>Important Notes</h2>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>A db4o object container is opened when a db4o database
editor is opened. It is closed again if the db4o database editor is closed again.
</p>

<p class=MsoNormal>More precisely, it is closed if the last open editor
referencing that object container is closed. This is valid for opened editor
windows displaying query results: Even if the db4o database editor displaying
the database content and queries is closed, the object container may remain
opened if there is a editor window open displaying query results for that
object container.</p>

<p class=MsoNormal>&nbsp;</p>

<p class=MsoNormal>  </p>

<p class=MsoNormal>&nbsp;</p>

</div>
    </p>
  </body>
</html>
<!--
Tip: to create a link which will open in an external web browser, try:
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
    <param name="content" value="http://www.netbeans.org/">
    <param name="text" value="<html><u>http://www.netbeans.org/</u></html>">
    <param name="textFontSize" value="medium">
    <param name="textColor" value="blue">
</object>
To create a link to a help set from another module, you need to know the code name base and path, e.g.:
<a href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/configure/configure_options.html">Using the Options Window</a>
(This link will behave sanely if that module is disabled or missing.)
-->
